{extends file="../home.html"}
{block name="title"}{$head_title}{/block}
{block name="css"}
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/front/front_css/detail_page.css?version={$version}"/>
    <style type="text/css">
        body{
            background:#fff;
        }
    </style>
{/block}
{block name="content"}
    <div class="teacher-detail project-detail-banner">
        <img src="{$user.headimgurl}"/>
        <!--导师信息-->
        <div class="teach-name pro-name">
            <div class="clearfix title">
                <h1 class="fl">{$user.realname}</h1>
                <span class="fr address">收藏</span>
                <span class="fr icon {if $is_collect}icon_like_selected3x{else}icon_like_default3x{/if} collect-icon collect"></span>
            </div>
            <ul>
                <li class="clearfix mg-top0" style="display:flex;align-items:center;">
                    <span class="fl">所在机构</span>
                    <p class="fl">{$user.company_address}</p>
                </li>
                <li class="clearfix" style="display:flex;align-items:center;">
                    <span class="fl">职位</span>
                    <p class="fl">{$user.position}</p>
                </li>
            </ul>
        </div>
        {include file="../detail_header.html"}
    </div>
    <div class="personal_profile">
       <h6>个人简介</h6> 
       <p>{$user.introduction}</p>
    </div>
    <div class="personal_info">
       <h6>投资信息</h6> 
       <span>关注领域：{implode(',',$user.follow_field)}</span>
       <span>关注阶段：{implode(',',$user.follow_phase)}</span>
       <span>主投币种：{$user.main_currency}</span>
       <span>有无海外投资资格：{if $user.overseas}有{else}无{/if}</span>
    </div>
    <div class="personal_info personal_info_mar">
       <h6>机构信息</h6> 
       <p>{$user.mechanism_desc}</p>
    </div>
    <a  onclick="check_user('/FrontEnjoy/bp_list')" class="apply-service">递交项目</a>
{/block}
{block name="js"}

	<script type="text/javascript">
    var touzi_id = '{$user.user_id}'
    //分享的参数
    var share_pic = '{$user.headimgurl}';
    var share_title = '{$user.realname}';
    var desc_str = '{$user.introduction}';
    var share_desc = desc_str.substr(0,30);
    var share_url = document.location.href;
    {literal}
		//收藏
		$(".pro-name .collect").on("click",function(){
                var obj = $(this);
                if($(this).hasClass('icon_like_selected3x')){
                    var type = 0;//取消
                }else{
                    var type = 1;//收藏
                }
                
                $.ajax({
                    url:'/FrontEnjoy/collect_touzi',
                    type:'post',
                    data:{touzi_id:touzi_id, type:type},
                    success:function(r){
                        if(r.code == 0){
                            obj.toggleClass("icon_like_default3x").toggleClass("icon_like_selected3x");
                            layer.open({
                                content: r.msg,
                                title: false,
                                btn: ['确定'],
                            });
                        }else{
                            layer.open({
                                content: r.msg,
                                title: false,
                                btn: ['确定'],
                            });
                        }
                    }
                })
            });
    {/literal}
	</script>

{/block}